package com.twu.biblioteca;

import com.twu.biblioteca.commands.*;
import com.twu.biblioteca.data_structures.Library;
import com.twu.biblioteca.data_structures.User;

import java.io.PrintStream;
import java.util.LinkedHashMap;

public class StateWithUser implements State {
    private LinkedHashMap<String, Command> menu;

    public StateWithUser(Library library, PrintStream ps, UserQueryHandler query, User activeUser){
        menu = new LinkedHashMap<String, Command>();

        menu.put("View all books", new ViewBooksCommand(library));
        menu.put("Reserve a book", new ReserveBookCommand(library, query, ps));
        menu.put("Check membership", new CheckMembershipCommand(ps, activeUser));
        menu.put("View all movies", new ViewMoviesCommand(library, ps));
        menu.put("Quit", new QuitCommand(ps));
    }

    public LinkedHashMap<String, Command> getMenu(){
        return menu;
    }
}
